package com.gxa.mapper;

import com.gxa.entity.DistrictSysOrganization;
import com.gxa.entity.DistrictSysUser;

import java.util.List;
import java.util.Map;

public interface DistrictOrganizationMapper {
    /**
     * 添加组织
     * @param districtSysOrganization
     * @return
     */
    int insertOrganization(DistrictSysOrganization districtSysOrganization);

    /**
     * 根据条件（最上层组织、父级编号、组织名称）查询组织
     * @param conditionMap
     * @return
     */
    DistrictSysOrganization selectOrganizationByCondition(Map conditionMap);

    /**
     * 查询对应区级的所有组织信息
     * @param topOrganization
     * @return
     */
    List<DistrictSysOrganization> selectAllOrganizations(String topOrganization);

    /**
     * 根据组织编号删除组织信息
     * @param id
     * @return
     */
    int deleteOrganizationById(int id);

    /**
     * 添加组织信息，组织编号固定不变
     * @param districtSysOrganization
     * @return
     */
    int insertOrganizationWithFixedId(DistrictSysOrganization districtSysOrganization);

    /**
     * 根据组织编号查询对应的账号信息
     * @param id
     * @return
     */
    List<DistrictSysUser> selectDistrictSysUsersById(int id);
}
